<?php
  include('./init.php');
  $song = str_replace(".mp3", "", "$_GET[song]");
  $song = str_replace('_', ' ', $song);
  $res = mysql_query("SELECT id_file,file_name,file_title FROM bj_audio WHERE file_title='". mysql_real_escape_string($_GET['song']) . "'");
  if ($res !== FALSE && mysql_num_rows($res)) {
    $lin = mysql_fetch_array($res);
    mysql_query("UPDATE traffic_stats SET item_views=item_views+1 WHERE item_id='{$lin[0]}'") or die(mysql_error());
  } else {
    header('Location: ./notfound.html');
    exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song </title>
<meta property="og:title" content="<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song" />
<meta property="og:type" content="song" />
<meta name="description" content="I love this theme song. Listen to more theme music and songs from 25,893 different television shows at TelevisionTunes.com" />
<meta name="keywords" content="<?php echo str_replace('.mp3', '', $lin[1]);?> theme song, <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> theme music, <?php echo str_replace('.mp3', '', $lin[1]); ?>s music, TV Theme songs, television songs, tv tunes"/>
<meta property="og:site_name" content="TelevisionTunes.com"/>
<meta property="og:type" content="song" />
<meta property="og:image" content="http://www.televisiontunes.com/images/logo-tiny2.jpg"/>
<meta property="fb:app_id" content="191531760901423" />
<meta property="og:url" content="<?php echo utils::create_href($lin['file_title']); ?>" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<!--<script type="text/javascript" src="js/jquery.jplayer.min.js"></script>-->
<script type="text/javascript" src="js/jquery-1.5rc1.js"></script>

<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/email.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />
<!--<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>-->
<script language="JavaScript" type="text/javascript" src="js/functions.js"></script>
<!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
<!--
.style4 {font-size: 12px}
.style5 {
	font-size: 1.3em;
	font-weight: bold;
}
a img { border:0px;}
a.download { color:white; }
a:hover.download { color:black; }
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>


<?php include('blocks/assets.php'); ?>
<script type="text/javascript">
//<![CDATA[  
$(document).ready(function(){
	jQuery.noConflict();
	
	
});
//]]>
</script>

</head>
<body>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div> 
<script>
FB.init({appId: '191531760901423', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.login', function(response) {
        window.location.reload();
});
</script>
<?php include('blocks/google-analytics.php'); ?>
<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
		<?php include('blocks/menu.php'); ?>
	</div>
	<div id="content-wrap">
		<?php include('blocks/donate_bar.php'); ?>
		<div id="main">
			<div class="player-top-content">
				<div class="player-top-content-right">
					<script type="text/javascript"><!--
					google_ad_client = "ca-pub-7168491151155439";
					/* TV Tunes Mobile */
					google_ad_slot = "9708777257";
					google_ad_width = 320;
					google_ad_height = 50;
					//-->
					</script>
					<script type="text/javascript"
					src="//pagead2.googlesyndication.com/pagead/show_ads.js">
					</script>
					
				</div>
			</div>
			<div class="player-left-content">
				<h2 class="title-2"><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song</h2>
				<div class="fb_like play-content-playing">
					<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(utils::create_href($lin['file_title'])); ?>&amp;layout=button_count&amp;show_faces=true&amp;width=80&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
					<g:plusone></g:plusone>
				</div>
				<div class="intro-player">
					<div align="center">
						<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
						<?php
							if ($_GET['song'] == 'Andy_Griffith_Show' ||
							$_GET['song'] == 'Dick_Van_Dyke_Show' ||
							$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
							$_GET['song'] == 'Gomer_Pyle_USMC' ||
							$_GET['song'] == 'I_Spy' ||
							$_GET['song'] == 'Mod_Squad'
							) {
							?>
					</div>
					<div style="text-align: left; font-size: .85em;"> &nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
					&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
					&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
					</div>
					<div align="center">
						<?php } else { ?>
							<img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;artist=theme&amp;song=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> 
							<span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
						 <?php } ?>
					</div>
				</div>
				<div class="jplayer-content-play">
					<div class="container-player">
						<div class="tool-player">
							<audio controls src="http://televisiontunes.com/themesongs/<?php echo $lin[1]; ?>" autoplay="true"></audio>
						</div>
						<div class="title-player">
							<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>
						</div>
						
						
					</div>
					
					<script src="js/jquery.iwish.js"></script>
					
				</div>
				<table cellpadding="0" cellspacing="0" class="tb-st2">
					<tr>
						<td align="center" width="33%">
							<a class="download" href="download.php?f=<?php echo urlencode($_GET['song']); ?>" onClick="javascript: pageTracker._trackPageview('/download/<?php echo $song; ?>');"><img src="images/back.png" alt="back" border="0" /> 
							<br />
							Download</a>
						</td>
						<td align="center" width="33%" valign="top" style="padding-top:15px;"> 
							<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=c9cf4f7f-936d-4bff-8063-3c01d20669ef&amp;type=website&amp;post_services=email%2Cfacebook%2Ctwitter%2Cgbuzz%2Cmyspace%2Cdigg%2Csms%2Cwindows_live%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cybuzz%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cpropeller%2Cwordpress%2Cnewsvine&amp;button=false"></script>
							<a id="ck_email" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/email.gif" /></a>
							<a id="ck_facebook" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/facebook.gif" /></a>
							<a id="ck_twitter" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/twitter.gif" /></a>
							<a id="ck_sharethis" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/sharethis.gif" />ShareThis</a>																								
							<script type="text/javascript">
								var shared_object = SHARETHIS.addEntry({
								title: document.title,
								url: document.location.href
							});												
							shared_object.attachButton(document.getElementById("ck_sharethis"));
							shared_object.attachChicklet("email", document.getElementById("ck_email"));
							shared_object.attachChicklet("facebook", document.getElementById("ck_facebook"));
							shared_object.attachChicklet("twitter", document.getElementById("ck_twitter"));
							</script>		
									
						</td>
						<td align="center" width="33%">
							<a class="download" href="javascript: history.go(-1)"><img src="images/download.png" alt="Download <?php echo $song; ?> theme song" border="0" />
							<br />
							Back</a>
						</td>
					</tr> 
					<tr>
						<td colspan="5" valign="top" style="padding-top:5px;" align="center"></td>
					</tr>
				</table>
				<div class="div3">
					<div align="center">
						<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
						<?php
							if ($_GET['song'] == 'Andy_Griffith_Show' ||
							$_GET['song'] == 'Dick_Van_Dyke_Show' ||
							$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
							$_GET['song'] == 'Gomer_Pyle_USMC' ||
							$_GET['song'] == 'I_Spy' ||
							$_GET['song'] == 'Mod_Squad'
							) {
						?>
					</div>
					<div style="text-align: left; font-size: .85em;">  nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
					&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
					&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
					</div>
					<div align="center">
						<?php } else { ?>
							<img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;search=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> <span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
						<?php } ?>
					</div>
				</div>
				<div class="div3">
					<div align="center">
						<?php include('blocks/index.php'); ?>
					</div>
				</div>
			</div>
			<div class="right-select-form">
				<div id="emailContainer" style="display: none;"></div>
				
				
				<div class="select-content-player">
					<h3 class="title-3">Newest Songs </h3>
					<select name="lsongs" onchange="document.location.href=this.options[this.selectedIndex].value" class="select-song">
						<option>Select a Song</option>
						<?php
							$file_id=$lin[0];
							$res2 = mysql_query("SELECT file_name, file_title FROM bj_audio ORDER BY date_added DESC LIMIT 100");
							if ($res2 !== FALSE && mysql_num_rows($res2)) {
								while($lin2 = mysql_fetch_assoc($res2)) {
									echo '<option value="' . utils::create_href($lin2['file_title']) . '">' . htmlspecialchars(str_replace('.mp3', '', $lin2['file_name'])) . '</option>';
								}
								mysql_free_result($res2);
							}
						?>
					</select>
				</div>
				<div class="link-right-content-ads">
					<?php include('blocks/ads_mediumRectangle.php');?>
				</div>
				<div align=""></div>
			</div>
			<div class="player-center-content">
				<?php include('blocks/site-links.php'); ?>
			</div>
	  </div>
	  <!-- content-wrap ends here -->
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->


</div>
<script type="text/javascript" src="http://cdn.fluidads.co/scripts/fluid/televisiontunes/default" id="FA_pubJS" async defer></script></body>
</html>

